<template>
    <div class="home">
        <leftnavs @sent-listnum="getlistnum"></leftnavs>
        
        <div class="right" :style="{ transform: `translateX(${moveX}px)`}">
            <div class="righttop">
                <el-breadcrumb separator-class="el-icon-arrow-right">
                    <el-breadcrumb-item :to="{ path: '/' }">当前位置</el-breadcrumb-item>
                    <el-breadcrumb-item>首页</el-breadcrumb-item>
                    
                </el-breadcrumb>
                <div class="top-rightbox">
                    <div>
                        <img src="../assets/topone.svg" alt="">
                        <span>提醒</span>
                    </div>
                    <div>
                        <img src="../assets/toptwo.svg" alt="">
                        <span>帮助</span>
                    </div>
                </div>
            </div>
            <div class="rightlist">
                <div class="seeuser">
                    <img src="../assets/blueline.svg" alt="">
                    <span>账户总览</span>
                </div>
                <div class="wtmoney">
                    <div class="wtmoneyleft">
                        <p><span>可用店铺余额(不可用店铺余额 CNY 0.00)</span><span class="restmoney">店铺余额明细</span></p>
                        <p class="lefthowmoney">￥0.00</p>
                    </div>
                    <div class="wtmoneyright">
                        <p><span>待结算</span><span class="restmoney">待结算明细</span></p>
                        <p class="righthowmoney">￥0.00</p>
                    </div>
                </div>
                <div class="seeuser1">
                    <div class="seeuserleft">
                        <img src="../assets/blueline.svg" alt="">
                        <span>收支概况</span>
                    </div>
                    <div class="seeuserright">
                        <span>今日</span>
                        <span>|</span>
                        <span>昨日</span>
                    </div>
                </div>
                <el-table
                :data="tableData"
                style="width: 100%">
                <el-table-column
                    prop="date"
                    label="账户"
                    width="180">
                </el-table-column>
                <el-table-column
                    prop="name"
                    label="收入"
                    width="180"
                    >
                </el-table-column>
                <el-table-column
                    prop="address"
                    label="支出">
                    
                </el-table-column>
                </el-table>
            </div>
            
        </div>
        
    </div>
    </template>
    
    <script>
    import HelloWorld from '@/components/HelloWorld.vue'
    import Leftnavs from '@/components/Leftnavs.vue';
    import Small from '@/components/Small.vue'
    
    import * as echarts from 'echarts'
 
    export default {
      name: 'HomeView',
      
      components: {
        HelloWorld,
        Small,
        Leftnavs,
          
      },
      data(){
        return{
            chart:null,
            listnum:0,
            value: '',
            tableData: [{
          date: '2016-05-03',
          name: '王小',
          address: '上海市普陀区金沙江路 1518 弄',
          shopname: '香蕉',
          shopclassify: '水果',
          status: '正常',
          visitnum: 100,
          salenum: 1000,
          wtgroup: '',
        },  {
            date: '2016-05-03',
          name: '小虎',
          address: '北京市海淀区西二旗',
          shopname: '香蕉',
          shopclassify: '水果',
          status: '正常',
          visitnum: 100,
          salenum: 1000,
          wtgroup: '',
        }, {
        date: '2016-05-03',
          name: '王小虎',
          address: '上海市浦东新区',
          shopname: '香蕉',
          shopclassify: '水果',
          status: '正常',
          visitnum: 100,
          salenum: 1000,
          wtgroup: '',
        }, {
            date: '2016-05-03',
          name: '王虎',
          address: '上海市浦东新区',
          shopname: '香蕉',
          shopclassify: '水果',
          status: '正常',
          visitnum: 100,
          salenum: 1000,
          wtgroup: '',
        }, {
            date: '2016-05-03',
          name: '王小',
          address: '北京市海淀区西二旗金沙江路 1518 弄',
          shopname: '香蕉',
          shopclassify: '水果',
          status: '正常',
          visitnum: 100,
          salenum: 1000,
          wtgroup: '',
        }, {
            date: '2016-05-03',
          name: '小虎',
          address: '北京市海淀区西二旗路 1518 弄',
          shopname: '香蕉',
          shopclassify: '水果',
          status: '正常',
          visitnum: 100,
          salenum: 1000,
          wtgroup: '',
        }, {
            date: '2016-05-03',
          name: '王虎',
          address: '上海市浦东新区 1518 弄',
          shopname: '香蕉',
          shopclassify: '水果',
          status: '正常',
          visitnum: 100,
          salenum: 1000,
          wtgroup: '',
        }],
        multipleSelection: [],
            options: [{
                value: '选项1',
                label: '蔬菜'
                }, {
                value: '选项2',
                label: '水果'
                },],
                value: '',
                dates: [{
                value: '选项1',
                label: '正常'
                }, {
                value: '选项2',
                label: '淘汰'
                },],
        }
      },
     
      methods:{
        getlistnum(i){
            this.listnum=i
            console.log(this.listnum);
            
        },
        dellistnum(){
            this.listnum=0
        },
        gonext(data){
            if(this.$route.name!=data){
				this.$router.push({name:data})
			}else{
				console.log('出错了');
			}
        },
		rehome(){
			if(this.$route.name!='home'){
				this.$router.push({name:'home'})
				
			}else{
				console.log('已经在主页了');
				
			}
  		},
        handleSelectionChange() {
            this.multipleSelection = this.$refs.multipleTable.selection;
        },
        
      },
      computed: {
        moveX() {
          return this.listnum >= 1 ? 115 : 0;
        },
      },
      
    
    }
    </script>
    <style scoped>
    *{
        padding: 0;
        margin: 0;
    }
    li{
        cursor: pointer;
    }
    .left{
        height: auto;
        width: 98px;
        background-color: rgb(0, 21, 41);	
    }
    ul{
        list-style: none;
        
    }
    .myphoto img{
        width: 48px;
        height: 48px;
        border-radius: 50%;
    }
    .myphoto{
        padding: 18px;
    }
    li img{
        height: 18px;
        margin-left: 13px;
        width: auto;
    }
    .right{
        transition:  all .8s;
    }
    .othersvg{
        width: 18px !important;
        height: auto;
    }
    li{
        display: flex;
        align-items: center;
        height: 44px;
    }
    
    li span{
        display: block;
        float: right;
        margin-left: 20px;
        font-size: 13px;
        color: rgb(228, 228, 228);
        font-weight: 400;
    }
    .morewith{
        padding-right: 2.5px;
        padding-left: 2.5px;
    }
    .righttop{
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 1260px;
        height: 36px;
        background-color: rgb(255, 255, 255);
        border: none;
        border-radius: 0px;
        box-shadow: rgba(0, 0, 0, 0.35) 0px 0px 5px;
    }
    .home{
        display: flex;
        margin: 0 auto;
        width: 1360px;
        margin: 0 auto;
    }
    .el-breadcrumb{
        margin-left: 10px;
    }
    .top-rightbox{
        
        color: #555;
        display: flex;
        align-items: center;
    }
    .top-rightbox div{
        font-size: 14px;
        margin-right: 15px;
        color: #555;
        display: flex;
        align-items: center;
    }
    .top-rightbox div img{
        margin-right: 5px;
    }
    .botonebox{
        display: flex;
    }

    .botline{
        width: 1227px;
        height: 429px;
        background: inherit;
        background-color: rgba(255, 255, 255, 1);
        border: none;
        border-radius: 0px;
        margin-left: 35px;
        margin-top: 20px;
    }
    .classify{
        z-index: 99;
        position: absolute;
        left: 142px;
        top: 0;
        width: 114px;
        height: 823px;
        background: inherit;
        background-color: rgba(255, 255, 255, 1);
        border: none;
        border-radius: 0px;
    }
    .shopreturn img{
        margin-left: 20px;
    }
    .shopreturn{
        height: 38px;
        line-height: 38px;
        border-bottom:1.5px solid #cfcfcf;
        font-size: 13px;
    } 
    .shopul li{
        padding-left: 19px;
        font-size: 13px;
    }
    .shopul{
        margin-top: 5px;
    }

    .addshop{
        width: 91px;
        height: 30px;
        background: inherit;
        background-color: rgba(0, 153, 255, 1);
        border: none;
        border-radius: 2px;
        font-weight: 400;
        font-style: normal;
        font-size: 12px;
        color: #fff;
        margin-bottom: 20px;
    }
    .addshop span{
        line-height: 30px;
    }
    .rightlist{
        margin-left: 10px;
        margin-top: 13px;
        background-color: #fff;
        padding: 20px 10px 0 18px;
    }
    .searchlist{
        background-color: #f4f9fa;
        width: 1220px;
        margin-top: 16px;
        height: 61px;
        display: flex;
        flex-wrap: wrap;
    }
    .searchone{
        display: flex;
        align-items: center;
    }
   
    .midclassify div{
        width: 100px;
        height: 30px;
        cursor: pointer;
    }
   
    .midlinebox{
        width: 1222px;
        height: 2px;
        background-color: #0079fe;
        margin-bottom: 35px;
    }
    ::v-deep .el-table__header-wrapper{
        border-color: rgba(204, 204, 204, 1);
        border-width: 1px;
        border-style: solid;
        border-left: 0px;
        border-right: 0px;
       
    }
    ::v-deep .el-table th {
        
        background-color: #f2f2f2;
    }
    ::v-deep .cell{
        line-height: 1;
    }
    ::v-deep .el-table th.el-table__cell>.cell{
        padding-left: 14px;
    }
    ::v-deep .el-date-editor{
        width: 200px;
    }
    ::v-deep .el-button{
        border: 0;
        margin-left: 5px;
        margin-right: 5px;
        color: #0099ff;
    }
    .seeuser{
        color: #333;
        font-size: 14px;
        padding-left: 7px;
        box-sizing: border-box;
        height: 40px;
        background-color: rgba(242, 242, 242, 1);
        display: flex;
        align-items: center;
        justify-content: start;
    }
    .wtmoneyleft{
        text-align: left;
        width: 60%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .wtmoneyright{
        text-align: left;   
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .wtmoneyright{
        width: 40%;
    }
    .wtmoney{
        display: flex;
        height: 100px;
        padding: 10px 0 15px 15px;
        font-size: 14px;    

    }
    .restmoney{
        color: #0099ff;
        margin-left: 8px;
    }
    .lefthowmoney{
        font-size: 28px;
        color: #333;
    }
    .righthowmoney{
     
        font-size: 28px;
        color: #333;
    }
    .seeuserleft{
        display: flex;
        align-items: center;
    }
    .seeuser1{
        color: #333;
    font-size: 14px;
    padding-left: 7px;
    box-sizing: border-box;
    height: 40px;
    background-color: rgba(242, 242, 242, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    }
    .seeuserright{
        padding-right: 10px;
    }
    .seeuserright span{
        color: #0099ff;
        margin-right: 5px;
    }
    ::v-deep .el-table{
        border-left: 1px solid #dddddd;
    }
    </style>